import { instance } from "@/request"

class MonitorHttp {
  static BASE_URL = "http://localhost:3000/back"
  static getHttp({ url }) {
    return new Promise((resolve, reject) => {
      instance.get(this.BASE_URL + url).then((res) => {
        resolve(res)
      })
    })
  }
  /* 请求得到饼状图的数据 */
  static getMonitorData() {
    return this.getHttp({
      url: `/monitor`,
    })
  }
}

export { MonitorHttp }
